#include "CalClient.hpp"

#include <memory>

using namespace client;
using namespace std;

//
static void Usage(void *proc)
{
    std::cerr << "\nUsage:\r\n"
              << proc << "serverip serverport\n\n";
}

// ./calclient serverip serverport
int main(int argc, char *argv[])
{
    if (argc != 3)
    {
        Usage(argv[0]);
        exit(1);
    }
    uint16_t serverport = atoi(argv[2]);
    std::string serverip = argv[1];

    std::unique_ptr<CalClient> tcl(new CalClient(serverip, serverport));
    tcl->initClient();
    tcl->start();

    return 0;
}
